#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
int main()
{
  pid_t ret =fork();
  if(ret>0)
  {
    printf("i am father...... pid::%d...ppid...%d\n",getpid(),getppid());
    exit(0);
  }
  else if(ret==0)
  {
    int i=0;
    for( i=0;i<10;i++)
    {
    printf("i am child......pid::%d...ppid...%d\n",getpid(),getppid());
    exit(0);
    }
  }
  else 
  {
    printf("error\n");
  }
  return 0;
}

